package com.fourhats.services;

import java.util.List;

import org.springframework.stereotype.Service;

import com.fourhats.services.dto.ProductBuyedDto;
import com.fourhats.services.dto.ProductDto;
import com.fourhats.services.util.Page;

@Service
public interface ProductService {
	
	public void addProduct(ProductDto product);
	
	public List<ProductDto> getProductsByKeyword(String keyWord);
	
	public Page<ProductDto> getProductsPageByKeyword(String keyword, int pageNumber, int pageSize);

	public ProductDto getProductById(long productId);
	
	public List<ProductDto> getRandomlyHighlightProducts(int maxResult);

	public Page<ProductDto> getProductsByCategory(long categoryId, int pageNumber, int pageSize, String orderBy);

	public Page<ProductDto> getProductsByMarketOrdered(long marketId, int pageNumber, int pageSize);
	
	public Page<ProductDto> getProductsByMarket(long marketId, int pageNumber, int pageSize);
	
	public boolean purchaseProduct(long productId, long id);

	public void editProduct(ProductDto product);

	public void deleteProduct(long productId);
	
	public Page<ProductDto> getAllProducts(int pageNumber, int pageSize, String orderBy);
	
	public Page<ProductBuyedDto> getPurchasedProducts(long userId, int pageNumber, int pageSize);
	
	public Page<ProductBuyedDto> getSoldProducts(long userId, int pageNumber, int pageSize);

	public boolean hasUnvisitedSoldProducts(long userId);
}